﻿using Refit;
using System;
using System.Collections.Generic;
using System.Text;

namespace Adnc.Shared.RpcServices.Rtos.Pro
{
    /// <summary>
    /// 商品信息
    /// </summary>
    public class ProductSizeDetailRto
    {
        /// <summary>
        /// 商品ID
        /// </summary>
        public long GoodsId { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        public string GoodsName { get; set; }

        /// <summary>
        /// 商品编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 标语
        /// </summary>
        public string Slogan { get; set; }

        /// <summary>
        /// 标签
        /// </summary>
        public string Tag { get; set; }

        /// <summary>
        /// 商品名称（维语)
        /// </summary>
        public string UighurGoodsName { get; set; }

        /// <summary>
        /// 标语（维语)
        /// </summary>
        public string UighurSlogan { get; set; }

        /// <summary>
        /// 标签（维语)
        /// </summary>
        public string UighurTag { get; set; }

        /// <summary>
        /// 是否是第三方商品
        /// </summary>
        public bool IsThirdParties { get; set; }

        /// <summary>
        /// 是否进入ERP，仅对第三方产品
        /// </summary>
        public bool ERPEnable { get; set; }

        /// <summary>
        /// 是否是国外商品
        /// </summary>
        public bool IsForeign { get; set; }

        /// <summary>
        /// 商品分类
        /// </summary>
        public int GoodsType { get; set; }

        /// <summary>
        /// 封面图
        /// </summary>
        public string SurfacePlot { get; set; }
        /// <summary>
        /// 轮播图
        /// </summary>
        public string Banner { get; set; }

        /// <summary>
        /// 详情图
        /// </summary>
        public string Details { get; set; }

        /// <summary>
        /// 视频地址
        /// </summary>
        public string VideoAddress { get; set; }

        /// <summary>
        /// 封面图（维语)
        /// </summary>
        public string UighurSurfacePlot { get; set; }
        /// <summary>
        /// 轮播图（维语)
        /// </summary>
        public string UighurBanner { get; set; }

        /// <summary>
        /// 详情图（维语)
        /// </summary>
        public string UighurDetails { get; set; }

        /// <summary>
        /// 视频地址(维语）
        /// </summary>
        public string UighurVideoAddress { get; set; }

        /// <summary>
        /// 不可销售区域
        /// </summary>
        public string NotSellAreaCode { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 上架时间
        /// </summary>
        public DateTime? PutawayTime { get; set; }

        /// <summary>
        /// 下架时间
        /// </summary>
        public DateTime? OffLoadingTime { get; set; }

        /// <summary>
        /// 是否进行第三方直推返佣
        /// </summary>
        public bool IsThirdCoupons { get; set; }

        /// <summary>
        /// 是否进入溯源码系统
        /// </summary>
        public bool TraceSource { get; set; }

        /// <summary>
        /// 可以购买到云仓的商品
        /// </summary>
        public bool IsSendRepertory { get; set; }

        /// <summary>
        /// 规格ID
        /// </summary>
        public long SizeId { get; set; }

        /// <summary>
        /// ERP编码
        /// </summary>
        public string ERPCode { get; set; }

        /// <summary>
        /// 规格名称
        /// </summary>
        public string SizeName { get; set; }

        /// <summary>
        /// 规格名称(维语)
        /// </summary>
        public string UighurSizeName { get; set; }

        /// <summary>
        /// 缩率图
        /// </summary>
        public string Thumbnail { get; set; }

        /// <summary>
        /// 业绩价格
        /// </summary>
        public decimal PerformancePrice { get; set; }

        /// <summary>
        /// 成本价格
        /// </summary
        public decimal CostPrice { get; set; }

        /// <summary>
        /// 原价
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// 代理积分
        /// </summary>
        public int ProxyIntegral { get; set; }

        /// <summary>
        /// 购物积分
        /// </summary>
        public int ShoppingIntegral { get; set; }

        /// <summary>
        /// 对应云仓商品ID
        /// </summary>
        public long? WarGoods { get; set; }

        /// <summary>
        /// 对应云仓规格ID，仅对直营商品有效
        /// </summary>
        public long? WarSize { get; set; }

        /// <summary>
        /// 对应云仓规格商品数量，仅对直营商品有效
        /// </summary>
        public int? WarCount { get; set; }

        /// <summary>
        /// 物流模板
        /// </summary>
        public long? LogisticsId { get; set; }

        /// <summary>
        /// 第三方商品返佣金额
        /// </summary>
        public decimal ThirdCommission { get; set; }

        /// <summary>
        /// 库存
        /// </summary>
        public int Inventory { get; set; }

        /// <summary>
        /// 商品价格
        /// </summary>
        [Query(CollectionFormat.Multi)]
        public List<ProductPriceRto> ProductPrices { get; set; }
    }

    public class ProductPriceRto {
        /// <summary>
        /// 用户等级
        /// </summary>
        public int UserLevel { get; set; }

        /// <summary>
        /// 价格
        /// </summary>
        public Decimal Price { get; set; }

        /// <summary>
        /// 经销商
        /// </summary>
        public long? SupplierId { get; set; }

        /// <summary>
        /// 积分价格
        /// </summary>
        public int IntegralPrice { get; set; }
    }


    public class ProductGiftRto
    {
        /// <summary>
        /// 
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 赠品ID
        /// </summary>
        public long GoodsId { get; set; }

        /// <summary>
        /// 赠品规格ID
        /// </summary>
        public long SizeId { get; set; }

        /// <summary>
        /// 单次购买量
        /// </summary>
        public int BuyCount { get; set; }

        /// <summary>
        /// 赠送数量
        /// </summary>
        public int Count { get; set; }

        /// <summary>
        /// 剩余数量
        /// </summary>
        public int RemainderCount { get; set; }

        /// <summary>
        /// 是否可以叠加
        /// </summary>
        public bool IsSuperposition { get; set; }

        /// <summary>
        /// 赠品详情
        /// </summary>
        public ProductSizeDetailRto GiftDetail { get; set; }
    }
}
